import { Injectable, Pipe, PipeTransform } from '@angular/core';

@Pipe({
    name: 'dailyState'
})
@Injectable()
export class DailyStateTrans implements PipeTransform {
    constructor() { }

    transform(param) {
        if (param) {
            param = param + '';
            if (param == '0') {
                return '无异常';
            }
            if (param == '1') {
                return '异常';
            }
        } else {
            return '无异常';
        }
    }
}
